home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
hardware
/
netvid.arc
/
RETURN.DOC
< prev
next >
Wrap
Text File
|
1989-10-15
|
2KB
|
47 lines
RETURN.EXE
v1.0
Brad Stephenson
670 Edgeworth
Jenison, MI 49428
Compuserve ID 71620,1035
I've often seen other users attempting to set up a batch file
that would branch on a certain DOS Errorlevel return code from
an executed program. In some cases, a fair amount of trial
and error is needed because the exact program return is not
known (and is not normally visible).
RETURN can help eliminate the trial and error. It allows you
to call up a program (passing it up to three command line
parameters) and see the DOS Errorlevel returned at the end of
program execution.
RETURN is most helpful when you would like a batch file to
present meaningful error messages when program errors occur.
Using RETURN, you call up the desired program, cause the
error, then note the DOS return code (see example). Now that
you know the exact return code, you can set up batch file
branch conditions to handle that specific error and display a
detailed error message.
SYNTAX:
RETURN <program> [parm1] [parm2] [parm3] [parm4]
parm1, parm2, parm3, and parm4 are optional command
line parameters for the called program.
EXAMPLE:
C>return fv badname
no file(s) found.
Errorlevel return from FV is: 2